export interface LoginForm {
  username: string
  password: string
}

export interface AxiosRes<T = ResData> {
  config: Object
  data: T
  headers: any
  request: any
  status: number
  statusText: string
}

// 定义axios中data的数据类型
export interface ResData<T = any> {
  code: number
  msg: string
  data: T
  ok: number
}

// 获取用户信息
export interface UserInfo {
  avatar: string
  buttons: string[]
  name: string
  roles: string[]
  routes: string[]
}

export type AxiosResData<T> = AxiosRes<ResData<T>>
